<form action="{action}" method="post">
<table border="0" id="table13" cellspacing="0" cellpadding="3">
	<tr>
		<td valign="top">{numorder}
<table id="table15" cellSpacing="1" cellPadding="0" width="551" border="0">
	<tr>
		<td bgColor="#5a79c6" height="20" width="49">
		<div align="center">
			<font color="#ffffff">号码</font></div>
		</td>
		<td bgColor="#5a79c6" height="20" width="49">
		  <div align="center">
		    <font color="#ffffff">赔率 A</font></div>
		  </td>
		<td bgColor="#5a79c6" height="20" width="49">
		  <div align="center">
		    <font color="#ffffff">号码</font></div>
		  </td>
		<td bgColor="#5a79c6" height="20" width="49">
		  <div align="center">
		    <font color="#ffffff">赔率 A</font></div>
		  </td>
		<td bgColor="#5a79c6" height="20" width="49">
		  <div align="center">
		    <font color="#ffffff">号码</font></div>
		  </td>
		<td bgColor="#5a79c6" height="20" width="49">
		  <div align="center">
		    <font color="#ffffff">赔率 A</font></div>
		  </td>
		<td bgColor="#5a79c6" height="20" width="49">
		  <div align="center">
		    <font color="#ffffff">号码</font></div>
		  </td>
		<td bgColor="#5a79c6" height="20" width="49">
		  <div align="center">
		    <font color="#ffffff">赔率 A</font></div>
		  </td>
		<td bgColor="#5a79c6" height="20" width="49">
		  <div align="center">
		    <font color="#ffffff">号码</font></div>
		  </td>
		<td bgColor="#5a79c6" height="20" width="49">
		<div align="center">
			<font color="#ffffff">赔率 A</font></div>
		</td>
	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>01</b></td>
		<td bgColor="#e7ebef" nowrap><input size=4 name="r0_01" value="{r0_01}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>11</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_11" value="{r0_11}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>21</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_21" value="{r0_21}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>31</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_31" value="{r0_31}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>41</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_41" value="{r0_41}"></td>

	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>02</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_02" value="{r0_02}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>12</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_12" value="{r0_12}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>22</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_22" value="{r0_22}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>32</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_32" value="{r0_32}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>42</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_42" value="{r0_42}"></td>

	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>03</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_03" value="{r0_03}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>13</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_13" value="{r0_13}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>23</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_23" value="{r0_23}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>33</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_33" value="{r0_33}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>43</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_43" value="{r0_43}"></td>

	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>04</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_04" value="{r0_04}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>14</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_14" value="{r0_14}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>24</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_24" value="{r0_24}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>34</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_34" value="{r0_34}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>44</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_44" value="{r0_44}"></td>

	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>05</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_05" value="{r0_05}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>15</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_15" value="{r0_15}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>25</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_25" value="{r0_25}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>35</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_35" value="{r0_35}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>45</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_45" value="{r0_45}"></td>

	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>06</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_06" value="{r0_06}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>16</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_16" value="{r0_16}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>26</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_26" value="{r0_26}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>36</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_36" value="{r0_36}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>46</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_46" value="{r0_46}"></td>

	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>07</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_07" value="{r0_07}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>17</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_17" value="{r0_17}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>27</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_27" value="{r0_27}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>37</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_37" value="{r0_37}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>47</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_47" value="{r0_47}"></td>

	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>08</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_08" value="{r0_08}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>18</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_18" value="{r0_18}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>28</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_28" value="{r0_28}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>38</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_38" value="{r0_38}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>48</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_48" value="{r0_48}"></td>

	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>09</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_09" value="{r0_09}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>19</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_19" value="{r0_19}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>29</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_29" value="{r0_29}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>39</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_39" value="{r0_39}"></td>
		<td class="ball_td" align="middle" background="image/green.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>49</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_49" value="{r0_49}"></td>

	</tr>
	<tr>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		<b>10</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_10" value="{r0_10}"></td>
		<td class="ball_td" align="middle" background="image/blue.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>20</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_20" value="{r0_20}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>30</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_30" value="{r0_30}"></td>
		<td class="ball_td" align="middle" background="image/red.gif" bgColor="#c0d6eb" height="27" width="49">
		  <b>40</b></td>
		<td bgColor="#e7ebef"><input size=4 name="r0_40" value="{r0_40}"></td>
		</tr>
</table>
赔率 <input name=ss1 size=3 value=0>&nbsp;
<input name=ss2 size=3 value=0 style="display:none">
<input type=button value=单  onclick=mm2(1)>
<input type=button value=双  onclick=mm2(2)>
<input type=button value=大  onclick=mm2(3)>
<input type=button value=小  onclick=mm2(4)>
<input type=button value=合单  onclick=mm2(5)>
<input type=button value=合双  onclick=mm2(6)>
<input type=button value=红  onclick=mm2(7)>
<input type=button value=蓝  onclick=mm2(8)>
<input type=button value=绿  onclick=mm2(9)>
<input type=button value=家禽  onclick=mm2(10)>
<input type=button value=野兽  onclick=mm2(11)>
&#12288;&#12288;&#12288;<input type="submit" value="确定更改">
<input type="button" value="重读" onclick="location.replace('{action}')">
</form>

<script>
function m1(o,d)
{
	var i = o.value - 0 + d;
	o.value = fixstr(i);
}

var gg1 = [1,3,5,7,9,10,12,14,16,18,21,23,25,27,29,30,32,34,36,38,41,43,45,47];       // 合单
var gg2 = [2,4,6,8,11,13,15,17,19,20,22,24,26,28,31,33,35,37,39,40,42,44,46,48];      // 合双
var gx1 = get_DomNumber();  // 家禽类
var gx2 = get_WildNumber(); // 野兽类
var po1 = [1,2,7,8,12,13,18,19,23,24,29,30,34,35,40,45,46];
var po2 = [3,4,9,10,14,15,20,25,26,31,36,37,41,42,47,48];
var po3 = [5,6,11,16,17,21,22,27,28,32,33,38,39,43,44,49];

function mm2(k)
{
	var i;
	var da = document.all.ss1.value - 0;
	var db = document.all.ss2.value - 0;
	switch (k) {
		case 1: //单
			for (i=1; i < 50; i++) {
				if (i%2==1) {
					if (da != 0) {
						kk = da + (document.all["r0_"+d2(i)].value - 0);
						document.all["r0_"+d2(i)].value = fixstr(kk);
					}
				}
			}
			break;
		case 2: //双
			for (i=1; i < 50; i++) {
				if (i%2==0) {
					if (da != 0) {
						kk = da + (document.all["r0_"+d2(i)].value - 0);
						document.all["r0_"+d2(i)].value = fixstr(kk);
					}
				}
			}
			break;
		case 3: //大
			for (i=25; i < 49; i++) {
				if (da != 0) {
					kk = da + (document.all["r0_"+d2(i)].value - 0);
					document.all["r0_"+d2(i)].value = fixstr(kk);
				}
			}
			break;
		case 4: //小
			for (i=1; i < 25; i++) {
				if (da != 0) {
					kk = da + (document.all["r0_"+d2(i)].value - 0);
					document.all["r0_"+d2(i)].value = fixstr(kk);
				}
			}
			break;
		case 5: //合单
			for (i=0; i < gg1.length; i++) {
				if (da != 0) {
					kk = da + (document.all["r0_"+d2(gg1[i])].value - 0);
					document.all["r0_"+d2(gg1[i])].value = fixstr(kk);
				}
			}
			break;
		case 6: //合双
			for (i=0; i < gg2.length; i++) {
				if (da != 0) {
					kk = da + (document.all["r0_"+d2(gg2[i])].value - 0);
					document.all["r0_"+d2(gg2[i])].value = fixstr(kk);
				}
			}
			break;
		case 7: //红
			for (i=0; i < po1.length; i++) {
				if (da != 0) {
					kk = da + (document.all["r0_"+d2(po1[i])].value - 0);
					document.all["r0_"+d2(po1[i])].value = fixstr(kk);
				}
			}
			break;
		case 8: //蓝
			for (i=0; i < po2.length; i++) {
				if (da != 0) {
					kk = da + (document.all["r0_"+d2(po2[i])].value - 0);
					document.all["r0_"+d2(po2[i])].value = fixstr(kk);
				}
			}
			break;
		case 9: //绿
			for (i=0; i < po3.length; i++) {
				if (da != 0) {
					kk = da + (document.all["r0_"+d2(po3[i])].value - 0);
					document.all["r0_"+d2(po3[i])].value = fixstr(kk);
				}
			}
			break;
		case 10: //家禽
			for (i=0; i < gx1.length; i++) {
				if (da != 0) {
					kk = da + (document.all["r0_"+d2(gx1[i])].value - 0);
					document.all["r0_"+d2(gx1[i])].value = fixstr(kk);
				}
			}
			break;
		case 11: //野兽
			for (i=0; i < gx2.length; i++) {
				if (da != 0) {
					kk = da + (document.all["r0_"+d2(gx2[i])].value - 0);
					document.all["r0_"+d2(gx2[i])].value = fixstr(kk);
				}
			}
			break;
	}
}

function fixstr(num)
{
	var numv=num-0;
	var sign=(numv>=0?1:-1); // Will give 1 for num=0
	var numabs=numv*sign;
	var naint=Math.floor(numabs);
	var nacent=Math.round((numabs-naint)*100);
	if (nacent>=100) {nacent=0; naint++;}
	var nais=''+naint;
	var nacs=(nacent<10?'0':'')+nacent;
	if (naint+nacent==0) sign=1;
	return (sign==1?'':'-')+nais+'.'+nacs;
}
/* 取得生肖年的配置,
/* 则传回依生肖对应号码组合的阵列
/* index =1~12 , TwelveAnimalSeed=生肖本命年(k_config->get("chinayear"))
*/
function GetChinaYearNumber(index , TwelveAnimalSeed){
    if (index<=0 || index>12) return NaN;

		var tmpTwelveAnimalArray = [null,
		[1,13,25,37,49],   //1
		[2,14,26,38],      //2
		[3,15,27,39],      //3
		[4,16,28,40],      //4
		[5,17,29,41],      //5
		[6,18,30,42],      //6
		[7,19,31,43],      //7
		[8,20,32,44],      //8
		[9,21,33,45],      //9
		[10,22,34,46],     //10
		[11,23,35,47],     //11
		[12,24,36,48]];    //12

    var mapingArray = new Array();//用来存放对应的阵列
    for(var i=1;i <= 12;i++){
        if(i == TwelveAnimalSeed){//等於种子者为1
            mapingArray[i] = 1;
        }else if(i < TwelveAnimalSeed){//小於种子的
            mapingArray[i] = (TwelveAnimalSeed - i)+1;
        }else{//大於种子的
            var tmpLoopNum = i-TwelveAnimalSeed;
            var tmpCunt = 0;
            for(var j=12;j >=1 ;j--){
                tmpCunt++;
                if(tmpCunt == tmpLoopNum){
                    mapingArray[i] = j;
                    break;
                }
            }
        }
    }
    return tmpTwelveAnimalArray[mapingArray[index]];
}
function get_DomNumber()  // 家禽 = 牛、马、羊、鸡、狗、猪
{
  var yearArr=new Array();
  for (var k=2; k<13; k++) {
		switch (k) {
			case 2:/*牛*/case 7:/*马*/case 8:/*羊*/case 10:/*鸡*/case 11:/*狗*/case 12:/*猪*/
      var tmpArr = GetChinaYearNumber(k,{cchinayear});
      yearArr = yearArr.concat(tmpArr);//合并
    }
  }
  return yearArr;			
}

function get_WildNumber()  // 野兽 = 鼠、虎、兔、龙、蛇、猴
{
  var yearArr=new Array();
  for (var k=1; k<10; k++) {
		switch (k) {
			case 1:/*鼠*/case 3:/*虎*/case 4:/*兔*/case 5:/*龙*/case 6:/*蛇*/case 9:/*猴*/
      var tmpArr = GetChinaYearNumber(k,{cchinayear});
      yearArr = yearArr.concat(tmpArr);//合并
    }
  }
  return yearArr;
}
</script>